# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)


Level.create(:name => '高中')
Level.create(:name => '初中')
Level.create(:name => '小学')


@course1 = Course.create(:name => '语文')
@course2 = Course.create(:name => '数学')
@course3 = Course.create(:name => '英语')
@course4 = Course.create(:name => '物理')
@course5 = Course.create(:name => '化学')
@course6 = Course.create(:name => '生物')
@course7 = Course.create(:name => '历史')
@course8 = Course.create(:name => '政治')
@course9 = Course.create(:name => '地理')
@course10 = Course.create(:name => '文综')
@course11 = Course.create(:name => '理综')



@level1 = Level.find_by(:name => '高中')

@grades_gz = @level1.grades.create(:name => '高一')
@grades_gz = @level1.grades.create(:name => '高二')
@grades_gz = @level1.grades.create(:name => '高三')





@level2 = Level.find_by(:name => '初中')
@level2.grades.create(:name => '初一')
@level2.grades.create(:name => '初二')
@level2.grades.create(:name => '初三')


@level3 = Level.find_by(:name => '小学')
@level3.grades.create(:name => '一年级')
@level3.grades.create(:name => '二年级')
@level3.grades.create(:name => '三年级')
@level3.grades.create(:name => '四年级')
@level3.grades.create(:name => '五年级')
@level3.grades.create(:name => '六年级')
